package xyz.codej.websocket.utils;

import cn.hutool.core.lang.Snowflake;
import cn.hutool.core.util.IdUtil;

/**
 * @ClassName: SnowFlake
 * @Description 雪花id生成器
 * @Author 王华君
 * @Date 2020/4/2 3:48 下午
 * @VERSION 1.0
 */
public class SnowFlake {

    private static final cn.hutool.core.lang.Snowflake snowflake = IdUtil.createSnowflake(1, 1);

    public static String generate(){
        return snowflake.nextIdStr();
    }
}
